//
//  TJBaseNavController.m
//  CrossBorderPayment
//
//  Created by hc-101 on 2020/6/9.
//  Copyright © 2020 xtjun. All rights reserved.
//

#import "TJBaseNavController.h"
#import "TJBaseController.h"


@interface TJBaseNavController ()

@end

@implementation TJBaseNavController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationBar.hidden = YES;
    [self setNavigationBarHidden:YES];

}
 
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    
    if (self.childViewControllers.count > 0) {
        if ([viewController isKindOfClass:TJBaseController.class]) {
            TJBaseController *baseController = (TJBaseController *)viewController;
            [baseController addBackButton];
        }
    }
    [super pushViewController:viewController animated:animated];
}


- (UIViewController *)childViewControllerForStatusBarStyle {
    return self.topViewController;
}

- (UIViewController *)childViewControllerForStatusBarHidden {
    return self.topViewController;
}


@end
